<?php
/**
 * Created by PhpStorm.
 * User: 123
 * Date: 2021/6/24
 * Time: 10:25
 */
namespace app\api\service;

class Base
{
    protected $_error = '';

    /**
     * 设置错误信息
     *
     * @param $error 错误信息
     */
    public function setError($error)
    {
        $this->_error = $error;
    }

    /**
     * 获取错误信息
     * @return string
     */
    public function getError()
    {
        return $this->_error ? __($this->_error) : '';
    }
}